package com.wf.course.service.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.utils.page.PageBean;
import com.wf.course.dao.IActivityMapper;
import com.wf.course.model.comm.Activity;
import com.wf.course.service.IActivityService;

@Service
@Transactional
public class IActivityServiceImpl implements IActivityService {
	
	@Autowired
	private IActivityMapper mapper;
	
	@Override
	public void getActivityList(PageBean<Activity> pageBean) {
		// TODO Auto-generated method stub
		pageBean.setResults(mapper.getActivityList(pageBean));
		pageBean.setTotalCount(mapper.getActivityCount(pageBean));
	}

	@Override
	public Activity getActivity(Integer id) {
		// TODO Auto-generated method stub
		return mapper.getActivity(id);
	}

	@Override
	public void saveActivity(Activity activity) {
		// TODO Auto-generated method stub
		mapper.saveActivity(activity);
	}

	@Override
	public void updateActivity(Activity activity) {
		// TODO Auto-generated method stub
		mapper.updateActivity(activity);
	}

	@Override
	public void deleteActivity(Integer id) {
		// TODO Auto-generated method stub
		mapper.deleteActivity(id);
	}

}
